<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    class Parent{
        constructor(m){
            this.msg = m;
        }
        show(){
            console.log(this.msg);
        }
    }

    class Child extends Parent{
        constructor(m){
            super(m);
        }
        show(){
            console.log(123123);
        }
    }
    
    const p = new Parent("hello");
    console.log(p);
    p.show();

    const c = new Child("world");
    console.log(c);
    c.show();

    // 子类是父类的子类
    // 父类是子类的超类

</script>
</html>